package com.suixinsanren.design.adapter.demo05;

import org.junit.Test;

public class AdapterTestDrive {

    @Test
    public void test() {
        Duck duck = new WildDuck();
        testDuck(duck);
        Turkey turkey = new WildTurkey();
        testDuck(new TurkeyDuckAdapter(turkey));
    }

    public void testDuck(Duck duck) {
        duck.quack();
        duck.fly();
    }
}
